<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/1/2
 * Time: 21:12
 */

namespace Home\Controller;


use Common\Controller\HomeController;
use Common\Model\GoodsModel;

class ListController extends HomeController
{
	/**
	 * 首页 页面
	 */
	public function index(){
		//分配公共头部数据
		$conf = ['js'=>['list'],
			'css'=>['index']
		];
		$cid = I('get.cid');
//		dd($cid);
//dd($_SESSION);
		//查询符合条件的商品
		$data = (new GoodsModel())->where("cid=$cid")->select();
//		dd($data);
		$this->assign('data',$data);
		$this->assign('conf',$conf);
		$this->display();
	}

}